import service from "../request/index";

// 电影总页获取数据
export const AllMoviesService =(currentPage,pageSize) => {
    return service({
        method: 'GET',
        url: '/movie/films/',
        params: {
            currentPage:currentPage,
            pageSize:pageSize
        }
    })
}

// 电影详情页获取数据
export const GetMovieDetailService = (id) =>{
    return service({
        method:'GET',
        url:`/movie/filmdetail/?id=${id}`,
    })
}


// 电影详情页的喜欢和评分
export const GetLikeAndScoreService = (movie_id,user_id,Like,Score)=>{
    return service({
        method:'POST',
        url:'/movie/behavior/',
        data:{
            movie:movie_id,
            user:user_id,
            behavior_like:Like,
            behavior_score:Score
        }
    })
}

// 电影推荐列表
export const RecommandMovieService = (id)=>{
    return service({
        method:'GET',
        url:'/movie/recommand_movie/',
        params:{
            id:id
        }
    })
}

// 电影主页的正在上映
export const NowMovieService = () =>{
    return service({
        method:'GET',
        url:'/movie/nowmovie/'
    })
}